Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: same treatment for get_shard_uids() as for shard_ids() #10305

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

akhi3030
Copy link
Collaborator

@akhi3030 akhi3030 commented Dec 6, 2023

  • renames get_shard_uids() to shard_uids()
  • shard_uids() return an iterator instead of a vector.

@akhi3030 akhi3030 requested a review from a team as a code owner December 6, 2023 11:56
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (8985a96) 68.19% compared to head (936e0bb) 71.75%.

Files Patch % Lines
nearcore/src/entity_debug.rs 0.00% 7 Missing ⚠️
tools/database/src/corrupt.rs 0.00% 5 Missing ⚠️
tools/database/src/state_perf.rs 0.00% 4 Missing ⚠️
chain/chain/src/chain.rs 60.00% 0 Missing and 2 partials ⚠️
tools/fork-network/src/cli.rs 0.00% 1 Missing ⚠️
tools/fork-network/src/storage_mutator.rs 0.00% 1 Missing ⚠️
tools/state-viewer/src/commands.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10305      +/-   ##
==========================================
+ Coverage   68.19%   71.75%   +3.56%     
==========================================
  Files         700      712      +12     
  Lines      141495   143098    +1603     
  Branches   141495   143098    +1603     
==========================================
+ Hits        96489   102685    +6196     
+ Misses      40455    35711    -4744     
- Partials     4551     4702     +151     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (?)
db-migration 0.08% <0.00%> (?)
genesis-check 1.26% <0.00%> (?)
integration-tests 36.18% <37.20%> (?)
linux 71.64% <51.16%> (+3.45%) ⬆️
linux-nightly 71.38% <51.16%> (?)
macos 55.00% <39.53%> (?)
pytests 1.26% <0.00%> (?)
unittests 68.18% <39.53%> (-0.02%) ⬇️
upgradability 0.13% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

self.shard_ids()
.map(|shard_id| ShardUId::from_shard_id_and_layout(shard_id, self))
.collect()
/// Returns an iterator that iterates over all the shard uids for all the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns an iterator that iterates over all the shard uids for all the
/// Returns an iterator over all the shard uids for all the

nit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, even though it is more verbose I believe that the original is grammatically correct.

@akhi3030 akhi3030 added this pull request to the merge queue Dec 7, 2023
Merged via the queue into near:master with commit abf6e99 Dec 7, 2023
18 of 19 checks passed
@akhi3030 akhi3030 deleted the iter-shard-uid branch December 7, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants